function downTable(that,fileName) {
 	var cName=[];
	var cList=[];
	$(that).parent().parent().find("table:first").find("tr").each(function(){
        $(this).find("th").each(function(){
        	cName.push($(this).html());
        });
        
    	var c2=[];
        $(this).find("span").each(function(){
        	c2.push($(this).html());
        });
        cList.push(c2);
    });
	$("#fileName").val(encodeURI(encodeURI(JSON.stringify(fileName))));
	$("#cName").val(encodeURI(encodeURI(JSON.stringify(cName))));
	$("#cList").val(encodeURI(encodeURI(JSON.stringify(cList))));
	$("#exportForm").submit()
	
}

function downTable2(that,fileName) {
 	var cName=[];
	var cList=[];
	$(that).parent().parent().find("table:eq(1)").find("tr").each(function(){
        $(this).find("th").each(function(){
        	cName.push($(this).html());
        });
        
    	var c2=[];
        $(this).find("span").each(function(){
        	c2.push($(this).html());
        });
        cList.push(c2);
    });
	$("#fileName").val(encodeURI(encodeURI(JSON.stringify(fileName))));
	$("#cName").val(encodeURI(encodeURI(JSON.stringify(cName))));
	$("#cList").val(encodeURI(encodeURI(JSON.stringify(cList))));
	$("#exportForm").submit()
	
}

function alertMsg(msg)
{
	alert(msg);
}